import { services } from '@/config'

export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  labelWidth: 120,
  searchLabelWidth: 100,
  searchMenuSpan: 6,
  searchShow: false,
  viewBtn: true,
  column: [
    {
      type: 'select',
      label: '人员名称',
      prop: 'name',
      formslot: true,
      span: 12,
      search: true,
      dicUrl: `${services.adminService}user/tree`,
      dicMethod: 'get',
      props: { label: 'name', value: 'id' },
      rules: [
        {
          message: '请选择人员',
          required: true
        }
      ]
    },
    {
      type: 'input',
      label: '合同编号',
      search: true,
      prop: 'contractNo',
      span: 12
    },
    {
      formslot: true,
      label: '单位名称',
      search: true,
      prop: 'deptName',
      span: 24
    },
    {
      type: 'date',
      label: '合同开始时间',
      search: true,
      prop: 'contractStartDate',
      span: 12,
      display: true,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      searchSpan: 12,
      searchRange: true
    },
    {
      type: 'date',
      label: '合同结束时间',
      prop: 'contractEndDate',
      span: 12,
      display: true,
      format: 'yyyy-MM-dd',
      valueFormat: 'yyyy-MM-dd',
      searchSpan: 12,
      search: true,
      searchRange: true
    },
    { type: 'textarea', label: '备注', prop: 'note', span: 24, display: true },
    {
      label: '附件信息',
      prop: 'uploadPage',
      type: 'input',
      formslot: true,
      slot: true,
      span: 24,
      hide: true
    }
  ]
}
